# -*- encoding: utf-8 -*-
"""
File Name: monitoring_redis_data
Description:
Author : 'lirui'
date: 10/24/2024
Contact: marjey_lee@163.com
Change Activity:
10/24/2024:
"""
import json


class MonitorRedisData:
    def __init__(self, publish_channel):
        self.is_monitor_success = None
        self.monitor_message = None
        self.publish_channel = publish_channel
        self.send_data_timestamp = None
        self.data = None

    def dumps(self):
        data = dict(
            is_monitor_success=self.is_monitor_success,
            monitor_message=self.monitor_message,
            send_data_timestamp=self.send_data_timestamp,
            data=self.data,
            publish_channel=self.publish_channel
        )
        return json.dumps(data)
